|
|
|
|
|
|
|
Figure C.1
Using * in the fieldlist parameter
selects all fields from the source table. |
|
|
|
|
|
|
|
|
Figure C.2
This recordset results from specifying
individual fields in the SELECT statement. |
|
|
|
|
|
|
|
|
Selecting Fields from Multiple Tables |
|
|
|
|
|
|
|
|
As you might remember from the discussions on database design in Chapter 24, "Database Basics," you normalize data by placing it in different tables to eliminate data redundancy. When you retrieve this data for viewing or modification, you want to see all the information from the related tables. SQL lets you combine information from various tables into a single recordset. |
|
|
|
|
|
|
|
|
To select data from multiple tables, you specify three things: |
|
|
|
|
|
|
|
|
The table from which each field is selected |
|
|
|
|
|
|
|
|
The fields from which you are selecting the data |
|
|
|
|
|
|
|
|
The relationship between the tables |
|
|
|
|
|